#!/usr/bin/python3
# -*- coding: utf-8 -*-

from tkinter import *

root = Tk()
root.title('Cassiopée Browser')

class AboutCassiopée(Toplevel):

    def __init__(self, parent):
        super().__init__(parent)
        self.title('About Cassiopée')
        self.buildwidgets()

    def buildwidgets(self):
        self.closebutton = Button(self, text='Close Window',
                                  command=self.close)
        self.closebutton.pack(pady=5)

    def close(self):
        self.destroy()

def opennew():
    print('Should open a new file.')

def aboutapp():
    print('Should display some info about the app.')
    dialog = AboutCassiopée(root)

# create a menu
menu = Menu(root)
root.config(menu=menu)

filemenu = Menu(menu)
menu.add_cascade(label="File", menu=filemenu)
filemenu.add_command(label="Open...", command=opennew)

helpmenu = Menu(menu)
menu.add_cascade(label="Help", menu=helpmenu)
helpmenu.add_command(label="About Cassiopée", command=aboutapp)

canvas = Canvas(root, width=840, height=680)
canvas.config(scrollregion=canvas.bbox(ALL))
canvas.pack()

canvas.create_line(0, 0, 840, 680, fill="blue", dash=(4, 4))
canvas.create_line(0, 680, 840, 0, fill="red", dash=(4, 4))

root.mainloop()
